#include "stdafx.h"
#include "TestNoteParamFrame.h"
#include "NoteParamRegBase.h"
#include "Tree.h"

using namespace PDMS::PDMSFrame;

CPPUNIT_TEST_SUITE_REGISTRATION( TestNoteParamFrame );


TestNoteParamFrame::TestNoteParamFrame()
{
}


TestNoteParamFrame::~TestNoteParamFrame()
{
}

class TestNoteParam : public NoteParamRegBase
{
	DECLARE_REGISTER_MAP( TestNoteParam );

public:
	UESoft::ErrorStatus Show( Tree* pTree ){
		return UESoft::eOk;
	}
};

BEGIN_REGISTER_MAP( TestNoteParam, NoteParamRegBase )
REGISTER( UE_RUNTIME_CLASS( UeDbObject ), GET_REGISTER( NoteParamRegBase, VersionOne ) ) 
END_REGISTER_MAP();

void TestNoteParamFrame::TestReg()
{
	CPPUNIT_ASSERT( GET_REGISTER( NoteParamRegBase, VersionOne )->CreateObject( 
										UE_RUNTIME_CLASS( Tree ) ) != NULL );
	CPPUNIT_ASSERT( GET_REGISTER( NoteParamRegBase, VersionOne )
		->CreateObject( UE_RUNTIME_CLASS( PersistentObject ) ) == NULL );
}